{%- import "apostrophe-schemas:macros.html" as schemas -%}
{%- import "apostrophe-ui:components/buttons.html" as buttons -%}

{% macro video(field) %}
  {% if not field.readOnly %}<input type="text" class="apos-field-input apos-field-input-text" name="{{ field.name }}" />{% endif %}
  <div class="apos-video-player" data-apos-video-player></div>
  <div class="apos-video-error" data-apos-video-error="401">{{ __ns('apostrophe', 'Embedding is not allowed for this video.') }}</div>
  <div class="apos-video-error" data-apos-video-error="404">{{ __ns('apostrophe', 'That video was not found. Paste a URL to the video\'s page.') }}</div>
{% endmacro %}

{{ schemas.fieldset(data, video) }}
